<extend name='Public/_Main' />
<block name='right'>
    <table class="table table-hover">
        <thead>
            <tr>
                <th>ID</th>
                <th>组名</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name='list.user' item='list'>
                <tr>
                    <td>{$list.id}</td>
                    <td>{$list.title}</td>
                    <td>{$list.status}</td>
                    <td>
                        <div role="group" class="btn-group">
                            <a href="{:U('group_access',array('id'=>$list['id']))}" class="btn btn-default">配置权限</a>
                            <a href="{:U('delete_group',array('id'=>$list['id']))}" class="btn btn-danger getajax">删除该组</a>
                        </div>
                    </td>
                </tr>
            </foreach>
        </tbody>
    </table>
    
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增权限组</h4>
                </div>
                <div class="modal-body">
                    <form class="require" action="{:U('addgroup')}" method="post">
                        <div class="form-group">
                            <label for="exampleInputEmail1">组名称<span class="Validform_checktip"></span></label>
                            <input type="text" class="form-control" placeholder="例：财务组" datatype='*' nullmsg='请填写组名称' errormsg='格式错误' name="title">
                        </div>
                        <div class="modal-footer">
                            <div class='col-xs-6'>
                                <button class="btn btn-lg btn-primary btn-block" type="submit">保存</button>
                            </div>
                            <div class='col-xs-6'>
                                <button class="btn btn-lg btn-default btn-block" type="button" data-dismiss="modal">关闭</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--end Modal-->
</block>
